﻿using System;
using Runtime.Models;
using Runtime.Services.Battle;
using Runtime.Services.Battle.Entity;
using UnityEngine;

namespace Runtime.Models {

    /// <summary>
    /// 移动数据
    /// </summary>
    public interface IDFR_BattleMovementModel {

        /// <summary>
        /// 实例ID
        /// </summary>
        DFR_BattleEntityInstanceID EntityInstanceID { get; }

        /// <summary>
        /// 移动速度
        /// </summary>
        IDFR_ReadOnlyBattleData MoveSpeed { get; }

        /// <summary>
        /// 路径ID
        /// </summary>
        DFR_BattleWayID WayID { get; }

        /// <summary>
        /// 上一帧路径位置
        /// </summary>
        F64 LastWayPosition { get; }

        /// <summary>
        /// 路径位置
        /// </summary>
        IDFR_ReadOnlyBattleData WayPosition { get; }

        /// <summary>
        /// 上一帧地图位置
        /// </summary>
        DFR_BattleMapPosition LastMapPosition { get; }

        /// <summary>
        /// 地图位置
        /// </summary>
        DFR_BattleMapPosition MapPosition { get; }

        /// <summary>
        /// 位置偏移
        /// </summary>
        Vector2F64 Offset { get; }
    }
}

namespace Internal.Runtime.Models {

    public interface IDFR_BattleMovementModelInternl : IDFR_BattleMovementModel {

        void SetLastPosition(F64 wayPosition, DFR_BattleMapPosition mapPosition);
    }
}
